a= "askdjfascx"

# 获取某个字符的位置
ind = a.index("dj")
print(ind)

# 是否包含某个子字符串
print("a" in a)

# 子字符串出现的次数
print(a.count("a"))

#长度
print(len(a))

# 获取某个下标处的字母
print(a[1])
print(a[1:9:2])
print(a[::-1]) # 字符串反转

b = "hello-world-你好-世界"
ls = b.split("-")
print(ls)

# join的列表元素必须是字符串类型
c = "-".join(["ab","b","c","d"])
print(c)

